package dao;

import beans.StuInfoBean;

import java.util.List;

public interface StuInfoDao {
    //向表中插入数据
    public int insertStudent(StuInfoBean stu);

    //根据id获取名字
    public String getUsernameById(String id);

    //查找表中的所有数据
    public List<StuInfoBean> findAllStudents();

    //根据学生id进行查找
    public StuInfoBean findStudentById(String id);

    //根据学生姓名进行查找
    public List<StuInfoBean> findStudentsByName(String name);

    //根据学生班级进行查找
    public List<StuInfoBean> findStudentsByClass(String stuClass);

    //根据学生学院进行查找
    public List<StuInfoBean> findStudentsByCollege(String college);

    //根据学生专业进行查找
    public List<StuInfoBean> findStudentsByMajor(String major);

    //根据学生id进行删除
    public int deleteStudentById(String id);

    //更新表中的数据
    public int updateStudent(StuInfoBean stu);

}
